# -*- coding: utf-8 -*-
# 操作内容：
# @Software: PyCharm
# @File: base_api.py
# @Author: 一碗好酒（张智）
# @E-mail: 1473658931@qq.com, 
# @Time: 7月 08, 2021
# ---
from common.client import RequestsClient
from common.file_load import read_yaml


class   BuyerBaseApi(RequestsClient):
    buyer_token = None
    print('****BuyerBaseApi*****')
    def __init__(self):
        super().__init__()
        # self.host = 'http://www.mtxshop.com:7002'
        self.host = read_yaml('/config/http.yml')['buyerhost']
        self.headers = {
            'Authorization': BuyerBaseApi.buyer_token  # 公共引用token写在基类中。
        }
    # def print_token():
    #     print("token的值为："+BuyerBaseApi.buyer_token)
    # pass
class SellerBaseApi(RequestsClient):  # sellerbaseApi获取token值，配置访问参数
    seller_token = None
    def __init__(self):
        RequestsClient.__init__(self)
        # self.host = 'http://www.mtxshop.com:7003'
        self.host = read_yaml('/config/http.yml')['sellerhost']
        self.headers = {
            'Authorization': SellerBaseApi.seller_token  # 公共引用token写在基类中。
        }
    pass

class BasicBaseApi(RequestsClient):
    seller_token = None
    def __init__(self):
        super().__init__()
        self.host = read_yaml('/config/http.yml')['basichost']
